/**用户相关状态 */
import { makeObservable, observable, action } from "mobx";
import {Auth} from "../models/index.js"
class UserStores {
  @observable currentUser = "";
  // 获取用户信息
  @action pullUser(){
    this.currentUser = Auth.getCurrentUser()
  }
  // 注销用户
  @action resetUser(){
    this.currentUser = null
  }
  // 兼容mobex6.0版本
  constructor() {
    makeObservable(this);
  }
}

export default new UserStores()